<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>薪资想过万，代码敲三遍</title>
				<!-- 第2步，引用css和js -->
				<link rel="stylesheet" href="./bootstrap/bootstrap.min.css">
				<link rel="stylesheet" href="./bootstrap/bootstrap-icons.css">
				<script src="./bootstrap/bootstrap.min.js"></script>
		<style>
			#myToast {
				width: 200px;
				height: 50px;
				background-color: pink;
				line-height: 50px;
				position: fixed;
				left: 50%;
				transform: translateX(-50%);
				text-align: center;
			}
		</style>
    </head>
    <body>
			<!-- 第1步，准备轻提示的盒子并设置类toast -->
        <div id="myToast" class="toast">我是提示</div>

        <script>
					//第3步，创建轻提示的对象并调用其方法，来显示轻提示
					const myToast =document.querySelector('#myToast')
					// const toast = new bootstrap.Toast(盒子，配置对象)
					const toast = new bootstrap.Toast(myToast,{
						anmiation:true ,  //开启过渡动画
						autohide:true,   //自动隐藏
						delay:3000     //3000ms后自动隐藏
					})
					toast.show()
				</script>
    </body>
</html>